<?php
/**
 * Created by PhpStorm.
 * User: hebidu
 * Date: 15/11/23
 * Time: 14:16
 */

namespace Test\Controller;


use Api\Vendor\NetWarehourse\WHOrderNotify;
use Api\Vendor\NetWarehourse\WHOrderPackage;
use Api\Vendor\NetWarehourse\WHOrderStatusUpload;
use Api\Vendor\NetWarehourse\WHPurcharseOrder;

class TestWHController extends TestController {


    public function test36(){
        $cfg=array(
            'platform_id'=>730,
            'store_code'=>'BANMA',
            'seller_user_id'=>'BANMA',
            'wms_id'=>'BANMA',
            'key'=>'BANMA',
        );

        $request = new WHOrderStatusUpload();

        $param = array(
            'order_code' => "153071635525707366S"
        );

        $result = $request->request($param);

        dump($result);
    }

    public function test33(){

        //引入支付官方sdk
        $cfg=array(
            'platform_id'=>730,
            'store_code'=>'BANMA',
            'seller_user_id'=>'BANMA',
            'wms_id'=>'BANMA',
            'key'=>'BANMA',
        );

        $request = new WHOrderPackage($cfg);
        $order_code = "153071635525707366S";

        $result =  $request->request($order_code);

        dump($result);
        exit();
    }

    public function test32(){

        //引入支付官方sdk
        $cfg=array(
            'platform_id'=>730,
            'store_code'=>'BANMA',
            'seller_user_id'=>'BANMA',
            'wms_id'=>'BANMA',
            'key'=>'BANMA',
        );

        $request = new WHOrderNotify($cfg);
        $order_code = "153071635525707366S";

        $result =  $request->request($order_code);

        dump($result);
        exit();
    }

    public function test34(){

        //引入支付官方sdk
        $cfg=array(
            'platform_id'=>730,
            'store_code'=>'BANMA',
            'seller_user_id'=>'BANMA',
            'wms_id'=>'BANMA',
            'key'=>'BANMA',
        );

        $request = new WHPurcharseOrder($cfg);

        $data = array(
            'order_code'=>time(),
            'items'=>array(),
        );

        $data['items'][0] = array(
            'id'=>33,
            'name'=>'23432',
            'product_code'=>33,
            'count'=>3,
        );

        $result =  $request->request($data);

        dump($result);
        exit();
    }

    public function index(){
        $this->display();
    }

}